var g_iSch=0;var g_oFrm=document.forms["frm"];window.onload=ldFrm;function stFrm(){g_oFrm=document.forms["frm"]}function onClkPNTgl(iSt){stFrm();if(!a_fEmb)g_oFrm.action="?ae=Item&t="+a_sType+"&id="+gtEncMId();g_oFrm.hidpnst.value=iSt;sbtFrm(g_oFrm);return false}function onClkBrwsFld(){stFrm();if(!a_fEmb)g_oFrm.action="?ae=Item&t="+a_sType+"&id="+gtEncMId();g_oFrm.hidactbrfld.value=1;sbtFrm(g_oFrm);return false}function onClkTb(sCmd){switch(sCmd){case"close":onClose();break;case"delete":onDel();break;case"forward":onRplyFwd("Forward");break;case"junk":submtAct("Junk");break;case"move":mvMsg();break;case"next":sndAct("Next");break;case"notjunk":submtAct("NotJunk");break;case"previous":sndAct("Prev");break;case"reply":onRplyFwd("Reply");break;case"replyall":onRplyFwd("ReplyAll");break;case"sendagain":onRplyFwd("SendAgain");break}return false}function onDel(){if(!a_fInDelItms||confirm(L_PrDelPrp))submtAct("Del")}function mvMsg(){if(""==a_sType)a_sType=="IPM.Note";nv("?ae=Dialog&t="+urlEnc(a_sType)+"&a=Move&fid="+gtEncFId()+"&id="+gtEncMId())}function sndAct(sA){nv("?ae=PreFormAction&t=IPM.Note&a="+sA+"&id="+gtEncMId()+"&fId="+gtEncFId())}function submtAct(sA){stFrm();g_oFrm.action="?ae=PreFormAction&t=IPM.Note&a="+sA;g_oFrm.hidcmdpst.value=sA;sbtFrm(g_oFrm)}function onClkAtmt(iLvl){if(iLvl=="2"){alert(L_Lv2AttWrng);return false}else if(iLvl=="3"){return true}}function onClkBm(sT,fPhsh,fWb){nv("?ae=Item"+"&t="+sT+(a_fEmb?("&atttyp=embdd&id="+gtEmItmId(a_rgsIds)):"&id="+gtEncMId())+(fPhsh?"&ph=0":"")+(fWb?"&cb=0":""));return false}function onRplyFwd(sA){nv("?ae=PreFormAction&t="+a_sType+"&a="+sA+"&id="+(a_fEmb?gtEmItmId(a_rgsIds):gtEncMId()))}function onClose(){stFrm();if(a_fEmb)opnItm(a_sPrTp,g_oFrm.hidid.value);else nv(a_sBkUrl)}function ldFrm(){shwInfBr();shwAtt()}function shwInfBr(){if(a_fShwInfBr){var oTdInf=document.getElementById('tdInf');var oDivIB=document.getElementById('divIB');oTdInf.style.display=oDivIB.style.display="";oDivIB.parentNode.removeChild(oDivIB);oTdInf.appendChild(oDivIB)}}function shwAtt(){var oTr=document.getElementById('trAtt');if(a_fShwAtt){var oTd=document.getElementById('tdAtt');var oD=document.getElementById('divAtt');oTd.style.display=oTr.style.display="";oD.parentNode.removeChild(oD);oTd.appendChild(oD)}else{oTr.style.display="none"}}function onClkEmbItem(o,attid){opnEmbItem(o,gtEncMId(),attid,a_fEmb,a_fEmb?a_rgsIds:null);return false}function onClkRcpt(o,iT){nv("?ae=Item&t="+rcptType(iT)+"&id="+urlEnc(o.id)+"&m="+a_iNM+"&oT="+(a_fEmb?a_sPrTp:a_sType)+"&oId="+gtEncMId());return false}function onClkSndRct(){stFrm();var sId=g_oFrm.hidid.value;nv(getItmURL(a_sType,sId)+"&sndrct=1");return false}function gtEncMId(){stFrm();return urlEnc(g_oFrm.hidid.value)}function gtEncFId(){stFrm();return urlEnc(g_oFrm.hidfldid.value)}function onClkFM(){nv("?ae=Dialog&t=FolderManagement&m="+a_iNM+"&fId="+gtEncFId());return false}